<template>
	<div v-if="config">
		<el-form-item label="最小值">
			<el-date-picker size="default" class="formDate" v-model="config.props.min"
				value-format="YYYY-MM-DD HH:mm:ss" type="datetime" />
		</el-form-item>
		<el-form-item label="最大值">
			<el-date-picker size="default" class="formDate" v-model="config.props.max"
				value-format="YYYY-MM-DD HH:mm:ss" type="datetime" />
		</el-form-item>
		<el-form-item label="默认值">
			<value-com :id="id" :value-config="config.props"></value-com>
		</el-form-item>
	</div>
</template>

<script setup lang="ts">
import { computed, defineExpose } from "vue";
import { getCurrentConfig } from "../../../utils/objutil";
import ValueCom from './components/value/DateTime.vue'

let props = defineProps({
	id: {
		type: String,
		default: "",
	}
});

var config = computed(() => {
	return getCurrentConfig(props.id);
});
</script>

<style scoped lang="less">
:deep(.formDate div.el-input__wrapper) {
	width: 100% !important;
}

:deep(.formDate) {
	width: 100% !important;
}
</style>